import React, { useState, useEffect } from 'react'
import { seckillList } from '../../api'
import './seckill.scss'

export default function Seckill() {
  let [msList, setMsList] = useState([])   // 存储数据

  useEffect(() => {
    seckillList({ count: 1, liminNum: 6 }).then((res) => {
      setMsList(res.data.data)  
    })
  }, [])
  // console.log(msList);
  return (
    <div className='seckill'>
      
      <ul>
        {
          msList.map((item,index)=>{
            return <li key={index}>
              <img src={item.img1} alt="" />
              <p>&yen;{item.originprice}</p>  
            </li>
          })
        }
      </ul>

    </div>
  )
}
